/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   LargeRepair.java for com.pengtu.gsj.entity.zhgl    </p>
 * 
 * <p>最后修改 : $: 2017年8月23日-下午6:18:52 v 1.0.0	 heyong   $ </p>
 * 
*/

package com.pengtu.gsj.entity.zhgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * LargeRepair
 * 综合管理-发展指标-路面大中修比例实体类
 * 2017年8月23日 下午6:18:52
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_ZH_LARGEREPAIR")
public class LargeRepair extends IdEntity {

	private static final long serialVersionUID = -3306355467443062689L;
	
	private String testYear;					//年份
	private Double custodyKm;					//管养里程(km)
	private Double largeRepairKm;				//大中修工程里程(km)
	private Double preventRepairKm;				//预防性养护工程里程(km)
	private String remark;
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	
	@Column(name = "TESTYEAR")
	public String getTestYear() {
		return testYear;
	}
	public void setTestYear(String testYear) {
		this.testYear = testYear;
	}
	@Column(name = "CUSTODYKM")
	public Double getCustodyKm() {
		return custodyKm;
	}
	public void setCustodyKm(Double custodyKm) {
		this.custodyKm = custodyKm;
	}
	@Column(name = "LARGEREPAIRKM")
	public Double getLargeRepairKm() {
		return largeRepairKm;
	}
	public void setLargeRepairKm(Double largeRepairKm) {
		this.largeRepairKm = largeRepairKm;
	}
	@Column(name = "PREVENTREPAIRKM")
	public Double getPreventRepairKm() {
		return preventRepairKm;
	}
	public void setPreventRepairKm(Double preventRepairKm) {
		this.preventRepairKm = preventRepairKm;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
}
